﻿@model DCH.Areas.Admin.Models.Video

@{
    ViewBag.Title = "Create";
}

<h2>Create Video</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Video</legend>

        <div class="editor-label">
          Youtube Link
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.youtube_link)
            @Html.ValidationMessageFor(model => model.youtube_link)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description, new { @class="ckeditor", @id="Description"})
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
<script>
   
    var editor = CKEDITOR.instances["editor1"];
    if (editor) { editor.distroy(true); }
    CKEDITOR.replace("Description", {
        enderMode: CKEDITOR.ENTER_BR,
    });

    CKFinder.setupCKEditor(null, '@Url.Content("~/ckfinder/")')
    
</script>